package com.molichuxing.services.infrastructure.service;

import com.molichuxing.framework.service.RootService;
import com.molichuxing.services.business.dto.request.modify.StoreDeviceBizModifyDto;
import com.molichuxing.services.infrastructure.dto.response.StoreDeviceDto;

import java.util.List;

/**
 * <p>
 * 门店安装的设备表 服务类
 * </p>
 *
 * @author
 * @since 2019-08-12
 */
public interface StoreDeviceService extends RootService {

    /**
     * 根据门店id获取设备id信息
     *
     * @param storeId
     * @return
     */
    public List<Integer> getDeviceIdByStoreId(Integer storeId) throws Exception;

    /**
     * 查询设备是否和其它门店绑定
     *
     * @param storeId
     * @param deviceIdList
     * @return
     * @throws Exception
     */
    public List<Integer> getStoreDeviceByDeviceIds(Integer storeId, List<Integer> deviceIdList) throws Exception;

    /**
     * 添加门店设备
     *
     * @param storeDeviceDtoList
     * @return
     * @throws Exception
     */
    public Boolean createStoreDeviceBatch(List<StoreDeviceDto> storeDeviceDtoList) throws Exception;

    /**
     * 根据设备id删除门店设备
     *
     * @param ids
     * @return
     * @throws Exception
     */
    public Boolean deleteStoreDeviceByDeviceId(Integer storeId, List<Integer> ids) throws Exception;

    /**
     * 根据门店id删除门店设备
     *
     * @param storeId
     * @return
     * @throws Exception
     */
    public Boolean deleteStoreDeviceByStoreId(Integer storeId) throws Exception;

    /**
     * 获取门店id
     *
     * @param deviceId 设备id
     * @return
     */
    public Integer getStoreIdByDevice(Integer deviceId);

    /**
     * 获取门店id
     *
     * @param deviceIdListh
     * @return
     */
    public List<StoreDeviceDto> getStoreIdsByDevice(List<Integer> deviceIdListh);

    /**
     * 修改
     *
     * @param storeDeviceBizModifyDto
     * @return
     * @throws Exception
     */
    public Boolean modifyStoreDevice(StoreDeviceBizModifyDto storeDeviceBizModifyDto) throws Exception;

    /**
     * 设备id
     *
     * @param storeIdList
     * @return
     */
    public List<Integer> getDeviceIdByStoreIds(List<Integer> storeIdList);

}
